<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles"
	prefix="tiles"%>

<rich:panel header="#{messages['voucher.mgmt.label']}">
	<h:panelGrid>
		<h:outputText value="#{errorBean.errorMessage}" styleClass="error"></h:outputText>
	</h:panelGrid>
	
	<h:panelGrid width="100%">
		<h:panelGroup>
		    <h:outputText value="#{messages['assign.new.voucher']} - #{voucherMgmtBean.voucherEntryType}" styleClass="sub_header" />
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputText value="#{messages['instruction']}" styleClass="standardText_Instruction" />
		</h:panelGroup>
	</h:panelGrid>
	
	<t:panelGrid columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
		<h:outputText></h:outputText>
		<t:message for="voucherNo" styleClass="error"></t:message>
		
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="voucherNo" value="#{messages['voucher.no.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<t:selectOneMenu id="voucherNo" styleClass="standardText" value="#{voucherEntryBean.voucher.voucherId}" required="true">
				<f:selectItem itemLabel="#{messages['please.select']}" itemValue="" />
				<f:selectItems value="#{voucherMgmtBean.selectVoucherList}"/>
			</t:selectOneMenu>
		</h:panelGroup>	
		
		<h:outputText></h:outputText>
		<t:message for="voucherWeekend" styleClass="error"></t:message>
		
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="voucherWeekend" value="#{messages['voucher.weekend.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<t:selectBooleanCheckbox id="voucherWeekend" value="#{voucherEntryBean.weekend}"></t:selectBooleanCheckbox>
	</t:panelGrid>
	
	<rich:spacer height="10"></rich:spacer>
	
	<t:panelGrid columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
		<h:outputText></h:outputText>
		<t:panelGrid columns="2">
			<h:commandButton value="#{messages['assign']}" action="#{voucherEntryBean.addVoucherEntryAction}" actionListener="#{voucherEntryBean.addVoucherEntryActionEvent}" styleClass="button"></h:commandButton>
			<h:commandButton value="#{messages['back']}" action="#{voucherMgmtBean.refreshVoucherEntryAction}" styleClass="button" immediate="true"></h:commandButton>
		</t:panelGrid>
	</t:panelGrid>
</rich:panel>	